<?php
namespace Shama\Campain;
/**
 * Campain Partners.
 *
 * It represant a contact partner of a contact
 *
 * @author Xavier VILAIN
 * @package Shama\Contact
 *
 * @property int	$campainid	Id of the Campain
 * @property string $role 		Partner Role
 * @property string $contactid 	Id of Partner
 */
class Partner extends \Fox\Object {

	/**
	 * Link to Medical Study
	 */
	const LINK_CONTACTS = "contacts";

	/**
	 * Link to Campain
	 * @var string
	 */
	const LINK_CAMPAIN = "campain";
	
	/**
	 *
	 * Get id of the partner according to the parnter type
	 */
	public function partnerid()
	{
		return $this->partnerid;
	}

	/**
	 * Unique Id in sales objects
	 */
	public function salesId()
	{
		return $this->role.":".$this->partnerid();
	}
}
\Fox\Dao::infos(Partner::className(),new \Fox\Object\Info('campain_partners', \Fox\Databases::DB_APP));